Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@babel/plugin-transform-modules-umd
Advanced tools
This plugin transforms ES2015 modules to UMD
The @babel/plugin-transform-modules-umd package is a Babel plugin that transforms ES2015 modules to UMD (Universal Module Definition) format. This allows the modules to be used in various environments, such as in the browser, Node.js, or AMD (Asynchronous Module Definition) environments. The plugin provides flexibility in module usage across different platforms by wrapping the code in a UMD wrapper.
Transform ES2015 modules to UMD
This feature allows developers to write their JavaScript modules using the modern ES2015 module syntax and then transform them into UMD format. The transformed code can be executed in various environments without modification. The code sample shows a simple module exporting a string, transformed into UMD format.
"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\n\nvar _default = 'Hello World';\n\nexports.default = _default;\nmodule.exports = exports["default"];
Similar to @babel/plugin-transform-modules-umd, this package transforms ES2015 modules to AMD (Asynchronous Module Definition) format. While @babel/plugin-transform-modules-umd targets multiple environments, @babel/plugin-transform-modules-amd specifically targets AMD-compatible loaders.
This package transforms ES2015 modules to CommonJS format, making them suitable for use in Node.js environments. It is similar to @babel/plugin-transform-modules-umd in that it deals with module transformation, but it focuses on CommonJS format instead of UMD.
This Babel plugin transforms ES2015 modules to SystemJS format, a dynamic module loader that can load modules in multiple formats. It is similar to @babel/plugin-transform-modules-umd in its goal to make modules usable in different environments, but it specifically targets SystemJS-compatible environments.
This plugin transforms ES2015 modules to UMD
See our website @babel/plugin-transform-modules-umd for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-modules-umd
or using yarn:
yarn add @babel/plugin-transform-modules-umd --dev
v7.25.7 (2024-10-02)
babel-helper-validator-identifier
babel-traverse
babel-plugin-transform-classes
super()
check (@nicolo-ribaudo)babel-generator
infer
in compact mode (@nicolo-ribaudo)[no LineTerminator here]
after nodes (@nicolo-ribaudo)babel-types
babel-core
--experimental-require-module
(@nicolo-ribaudo)babel-helper-compilation-targets
, babel-helper-plugin-utils
, babel-preset-env
babel-plugin-proposal-destructuring-private
, babel-plugin-syntax-decimal
, babel-plugin-syntax-import-reflection
, babel-standalone
babel-generator
[no LineTerminator here]
before nodes (@nicolo-ribaudo)babel-plugin-transform-typescript
babel-types
BABEL_TYPES_8_BREAKING
at startup (@nicolo-ribaudo)FAQs
This plugin transforms ES2015 modules to UMD
The npm package @babel/plugin-transform-modules-umd receives a total of 21,670,378 weekly downloads. As such, @babel/plugin-transform-modules-umd popularity was classified as popular.
We found that @babel/plugin-transform-modules-umd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.